package com.dayaokeji.rhythmschoolstudent.client.home.course.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dayaokeji.rhythmschoolstudent.R
import com.dayaokeji.rhythmschoolstudent.utils.DateUtils
import com.dayaokeji.rhythmschoolstudent.utils.ExamUtils
import com.dayaokeji.rhythmschoolstudent.utils.TimeUtils
import com.dayaokeji.server_api.domain.Exam

/**
 *********************************************************************
 **  Created by Zeno on 2018/7/12
 *********************************************************************
 **  version 1.0
 *********************************************************************
 **  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 *********************************************************************
 **
 *********************************************************************
 */
class StudentQAListAdapter : BaseQuickAdapter<Exam,BaseViewHolder>(R.layout.item_student_qa,null) {

    override fun convert(helper: BaseViewHolder?, item: Exam?) {
        item?.let {
            helper?.setText(R.id.tvQAStatus,ExamUtils.getStatusName(it.status))
            helper?.setText(R.id.tvQATime,DateUtils.format(it.startTime,DateUtils.FORMAT_DATETIME))
            helper?.setText(R.id.tvQATitle,it.name)
        }

    }
}